package com.ziwei.material.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SecurityCode {
    //返回枚举响应体
//  这是shiro用的  LOGINFAILD(401,"用户名或密码错误",false),
    SUCCESS(200, "操作成功", true),
    TOKEN_EXPIRE(401, "Token expire", false),
    USERNAME_PASSWORDERROR(200, "Oops, your email or password is incorrect", false),
    /**
     * 系统限流
     */
    RPC_ERROR(500, "请求调用异常", false);

    //操作代码
    int code;
    //提示信息
    String message;
    //操作是否成功
    boolean success;

    public int code() {
        return code;
    }

    public String message() {
        return message;
    }
}
